{% extends 'user/user_base.html' %}

{% block form %}
    <h3>更改头像</h3>
    <form method="post" enctype="multipart/form-data">
        {% csrf_token %}
        <div class="form-group">
            <label for="id_head">头像文件</label>
            {{ form.head }}
            {% if form.head.errors %}
                {% for error in form.head.errors %}
                    <p class="text-danger">{{ error }}</p>
                {% endfor %}
            {% endif %}
        </div>
        <button type="submit" class="btn btn-primary">提交</button>
    </form>
{% endblock %}